<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8' />
        <style>
            div{
                width:200px;height:200px;
                border:1px solid red;
            }
            
               div.c1{
                    background-color:#ccc;                   /*背景颜色 */
                    background-image:url('./images/1.gif');  /*背景图片*/
                    background-repeat:no-repeat;            /*图片平铺样式*/
                    background-position:100px 100px;        /*图片的位置*/
                }
            
            
            div.c1{
                background-color:red;
                background:#00f url('./images/1.gif') no-repeat 0px 0px;  /*简写形式*/
            }
            
          
          
            div.c2{
                background-image:url('./images/3.jpg');
                background-position:-99px -47px;
            }
           
            body{
                /*background-image:url(./images/3.jpg);*/
                background-repeat:no-repeat;
                background-attachment:fixed;
            }
           
        </style>
        <link href='./css/a.css' type='text/css' rel='stylesheet' />  
    </head>
    <body>
        <h2>CSS样式实例:背景属性</h2>
        <div class='c1'></div>
        <div class='c2'></div>
       
        <div class='c3'></div>
    </body>
</html>